export default {
    data() {
      return {
        windowWidth: 0
      }
    },
    mounted() {
      this.$nextTick(() => {
        window.addEventListener('resize', this.onResize)
        this.onResize()
      })
    },
    beforeDestroy() {
      window.removeEventListener('resize', this.onResize)
    },
    methods: {
      onResize() {
        this.windowWidth = window.innerWidth
      }
    }
  }